<template>
    <el-form-item label="onInput">
        <el-button plain type="primary" size="small" @click="handleOpen">
            编辑
        </el-button>
        <show-dialog ref="showDialogRef" :selectWidget="selectWidget"/>
    </el-form-item>
</template>

<script setup>
import { ref } from 'vue';
import showDialog from './show-dialog.vue';
defineOptions({
    name:"onInput-editor"
})

const props = defineProps({
    optionModel:{
        type:Object,
        required:true
    },
    designer:{
        type:Object,
        default:()=>({})
    },
    selectWidget:{
        type:Object,
        default:()=>({}) 
    }
})

const showDialogRef = ref(null);

const handleOpen = ()=>{
    showDialogRef.value.openDialog(props.selectWidget.options['onInput'],'onInput')
    // 获取内容
}
</script>

<style lang='scss' scoped></style>